<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let arr = ['a', 'b', 'c', 'd']

      for (let i = 0; i < arr.length; i++) {
        //console.log(arr[i])
      }

      //for in 反射型循环
      for (let index in arr) {
        // console.log(index, arr[index])
      }
      //for of
      for (let item of arr) {
        console.log(item)
      }
    </script>
  </body>
</html>
